package cn.initcap.concurrency.concurrency.publish;

import cn.initcap.concurrency.annoations.NotRecomend;
import cn.initcap.concurrency.annoations.NotThreadSafe;
import lombok.extern.slf4j.Slf4j;

/**
 * 不安全的发布对象。
 *
 * @author initcap
 * @date Created in 2018/6/14 PM12:17.
 */
@Slf4j
@NotThreadSafe
@NotRecomend
public class Escape {

    private int thisCanBeEscape = 0;

    private Escape() {
        new InnerClass();
    }

    public static void main(String[] args) {
        new Escape();
    }

    private class InnerClass {

        private InnerClass() {
            log.info("{}", Escape.this.thisCanBeEscape);
        }

    }

}
